/*
Copyright (C) Ariff Ehsan, Abdul Hadi Fikri

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

/*  Author : Ariff Ehsan
 *           Abdul Hadi Fikri
 *  Date   : June 22, 2009
 */
 
 
#ifndef __ATMEGA644P_USART1_H__
#define __ATMEGA644P_USART1_H__

#define BAUD1 19200
#define MYUBRR1 F_CPU/16/BAUD1-1

void ATMEGA644P_USART1_init(void);
void ATMEGA644P_USART1_reg(void (*sendDone)(void), void (*receive)(uint8_t));
error_t ATMEGA644P_USART1_send(uint8_t data);

#define DRIVER_USART1_INIT() ATMEGA644P_USART1_init()
#define DRIVER_USART1_REG(x,y) ATMEGA644P_USART1_reg(x,y)
#define DRIVER_USART1_SEND(x) ATMEGA644P_USART1_send(x)

#endif // __ATMEGA644P_USART0_H__
